/**
 * @param {number[][]} matrix
 */
var NumMatrix = function (matrix) {
  console.log('Matrix:\t')
  console.log(matrix)
}

/**
 * @param {number} row1
 * @param {number} col1
 * @param {number} row2
 * @param {number} col2
 * @return {number}
 */
NumMatrix.prototype.sumRegion = function (row1, col1, row2, col2) {
  console.log('==================')
  console.log(row1, col1)
  console.log(row2, col2)
}

/**
 * Your NumMatrix object will be instantiated and called as such:
 * var obj = new NumMatrix(matrix)
 * var param_1 = obj.sumRegion(row1,col1,row2,col2)
 */
let matrix = [
  [
    [3, 0, 1, 4, 2],
    [5, 6, 3, 2, 1],
    [1, 2, 0, 1, 5],
    [4, 1, 0, 1, 7],
    [1, 0, 3, 0, 5]
  ]
]

let sumIndex = [
  [2, 1, 4, 3],
  [1, 1, 2, 2],
  [1, 2, 2, 4]
]
var obj = new NumMatrix(matrix)
// var param_1 = obj.sumRegion(...sumIndex[0])
console.log(...sumIndex[0]);
console.log(...sumIndex[1]);
console.log(...sumIndex[2]);
